using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Logs;

namespace Pixysoft.Framework.Noebe.MemoryCaches
{
    class LoggerHelper
    {
        static ILogger logger = Logger.GetLogger(StringHelper.global_framework_id);

        public static string Info(string format, params object[] paras)
        {
            if (string.IsNullOrEmpty(format))
                return null;

            return logger.Info(format, paras);
        }

        public static string Error(string format, params object[] paras)
        {
            if (string.IsNullOrEmpty(format))
                return null;

            return logger.Error(format, paras);
        }

        public static string Debug(string format, params object[] paras)
        {
            if (string.IsNullOrEmpty(format))
                return null;

            return logger.Debug(format, paras);
        }

        public static string Fatal(string format, params object[] paras)
        {
            if (string.IsNullOrEmpty(format))
                return null;

            return logger.Fatal(format, paras);
        }

        public static string Fatal(Exception ex)
        {
            if (ex == null)
                return null;

            return logger.Fatal(ex);
        }
    }
}
